package com.lvyq.myplayer.parcelable

import android.os.Parcel
import android.os.Parcelable

/**
 * 文件描述：MvPagerBeans
 * 作者：lvyq
 * 创建时间：2025-02-26
 * 修改时间：2025-02-26
 */
 data class MvPagerBeansData(
    val id:Int,
    val code: String?, val title: String?,
    val singer: String?, val url: String?,
    val img: String?, val singerImg: String?, val timer: String?
):Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readInt(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeInt(id)
        parcel.writeString(code)
        parcel.writeString(title)
        parcel.writeString(singer)
        parcel.writeString(url)
        parcel.writeString(img)
        parcel.writeString(singerImg)
        parcel.writeString(timer)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<MvPagerBeansData> {
        override fun createFromParcel(parcel: Parcel): MvPagerBeansData {
            return MvPagerBeansData(parcel)
        }

        override fun newArray(size: Int): Array<MvPagerBeansData?> {
            return arrayOfNulls(size)
        }
    }
}